+testexecdir = join_paths(installed_test_bindir, 'a11y')
+testdatadir = join_paths(installed_test_datadir, 'a11y')
+
a11y_tests = [
'accessibility-dump',
'tree-performance',
'util',
]
-testexecdir = join_paths(installed_test_bindir, 'a11y')
-testdatadir = join_paths(installed_test_datadir, 'a11y')
-
foreach t: a11y_tests
test_prefix = 'a11y'
install_dir: testexecdir,
dependencies: libgtk_dep),
args: [ '--tap', '-k', ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'a11y')
endforeach
install_dir: testexecdir)
test('api', test_api,
args: ['--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'css')
if get_option('install-tests')
testexecdir = join_paths(installed_test_bindir, 'css', 'nodes')
testdatadir = join_paths(installed_test_datadir, 'css')
-testexecdir = join_paths(installed_test_bindir, 'css', 'nodes')
test_nodes = executable('test-css-nodes', 'test-css-nodes.c',
install: get_option('install-tests'),
install_dir: testexecdir,
dependencies: libgtk_dep)
test('nodes', test_nodes,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'css')
test_data = [
dependencies: libgtk_dep)
test('parser', test_parser,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'css')
test_data = [
)
test('style', test_style,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'css')
test_data = [
test(t, test_exe,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'gdk')
if get_option('install-tests')
install_dir: testexecdir
)
-cairo_test_env = environment()
-cairo_test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
-cairo_test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
-cairo_test_env.set('GSETTINGS_BACKEND', 'memory')
-cairo_test_env.set('G_ENABLE_DIAGNOSTIC', '0')
-cairo_test_env.set('GSK_RENDERER', 'cairo')
-
test('nodes (cairo)', test_render_nodes,
- args: [ '--tap', '-k' ],
- env: cairo_test_env,
- suite: 'gsk')
+ args: [ '--tap', '-k' ],
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+ 'GSK_RENDERER=cairo'
+ ],
+ suite: 'gsk')
vulkan_test_env = environment()
vulkan_test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
vulkan_test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
vulkan_test_env.set('GSETTINGS_BACKEND', 'memory')
+vulkan_test_env.set('GTK_CSD', '1')
vulkan_test_env.set('G_ENABLE_DIAGNOSTIC', '0')
vulkan_test_env.set('GSK_RENDERER', 'vulkan')
test('nodes (vulkan)', test_render_nodes,
args: [ '--tap', '-k' ],
- env: vulkan_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+ 'GSK_RENDERER=vulkan'
+ ],
suite: 'gsk')
test_data = [
test(test_name, test_exe,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'gtk')
endforeach
install_dir: testexecdir)
test('c++ keywords', test_exe,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'gtk')
if get_option('install-tests')
conf = configuration_data()
installed_test_bindir = join_paths(gtk_libexecdir, 'installed-tests', 'gtk-4.0')
installed_test_datadir = join_paths(gtk_datadir, 'installed-tests', 'gtk-4.0')
-installed_test_env = [
- 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
- 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
- 'GIO_USE_VOLUME_MONITOR=unix',
- 'GSETTINGS_BACKEND=memory',
- 'GTK_CSD=1',
- 'G_ENABLE_DIAGNOSTIC=0',
-]
-
subdir('gdk')
subdir('gsk')
subdir('gtk')
bash = find_program('bash', required : false)
if bash.found()
test_env = environment()
- test_env.set('GTK_BUILDER_TOOL', get_variable('gtk4_builder_tool').full_path())
- test_env.set('GTK_QUERY_SETTINGS', get_variable('gtk4_query_settings').full_path())
foreach t : ['simplify', 'settings']
configure_file(output: t,
test(t, bash,
args: 'test-@0@'.format(t),
workdir: meson.current_build_dir(),
- env: test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+ 'GTK_BUILDER_TOOL=@0@'.format(get_variable('gtk4_builder_tool').full_path()),
+ 'GTK_QUERY_SETTINGS=@0@'.format(get_variable('gtk4_query_settings').full_path())
+ ],
suite: 'tools')
endforeach
endif